feat: add statistics tracking for keyboard and mouse usage#767
Open
Pleasurecruise wants to merge 3 commits intoayangweb:masterfrom
Open
feat: add statistics tracking for keyboard and mouse usage#767Pleasurecruise wants to merge 3 commits intoayangweb:masterfrom
Pleasurecruise wants to merge 3 commits intoayangweb:masterfrom
Conversation
Introduces a new Pinia store to track keyboard and mouse usage statistics, including per-key and per-button counts. Adds UI controls and localization for enabling/disabling statistics, mouse click tracking, and resetting statistics. Displays total input count overlay on main window when hovering and statistics are enabled.
There was a problem hiding this comment.
Pull request overview
This PR adds keyboard and mouse usage statistics tracking functionality to address feature request #110. The implementation introduces a new Pinia store for tracking statistics with persistence, UI controls in the preferences panel, and a visual counter overlay on the main window.
Key Changes:
- Created a new statistics store with separate tracking for keyboard keys and mouse buttons (left/right)
- Added settings UI with toggles for enabling statistics, mouse click tracking, and a reset button with confirmation
- Integrated statistics overlay display on main window when hovering and statistics are enabled
- Added localization support for all new UI elements across 4 languages (zh-CN, en-US, vi-VN, pt-BR)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/stores/statistics.ts | New Pinia store for tracking keyboard and mouse statistics with Tauri persistence |
| src/pages/preference/components/cat/index.vue | Added statistics settings section with enable/disable toggles and reset button |
| src/pages/main/index.vue | Integrated statistics counter overlay that displays total input count when hovering |
| src/composables/useDevice.ts | Added statistics recording hooks for keyboard presses and mouse clicks, exposed isHovering state |
| src/locales/zh-CN.json | Added Chinese translations for statistics-related UI labels, hints, and buttons |
| src/locales/vi-VN.json | Added Vietnamese translations for statistics-related UI labels, hints, and buttons |
| src/locales/pt-BR.json | Added Portuguese (Brazil) translations for statistics-related UI labels, hints, and buttons |
| src/locales/en-US.json | Added English translations for statistics-related UI labels, hints, and buttons |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
hi @ayangweb 👋 Do you have any suggestions or comments regarding this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #110
Introduces a new Pinia store to track keyboard and mouse usage statistics, including per-key and per-button counts. Adds UI controls and localization for enabling/disabling statistics, mouse click tracking, and resetting statistics. Displays total input count overlay on main window when hovering and statistics are enabled.